﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Xml.Linq;

namespace Tsina
{
    public class ConfigHelper
    {
        static ConfigHelper()
        {
            XDocument config = XDocument.Load("Config.xml");
            ConfigHelper.AppKey = config.Root.Element("AppKey").Value;
            ConfigHelper.AppSecret = config.Root.Element("AppSecret").Value;
            ConfigHelper.RequestTokenUrl = config.Root.Element("RequestTokenUrl").Value;
            ConfigHelper.AuthorizeUrl = config.Root.Element("AuthorizeUrl").Value;
            ConfigHelper.AccessTokenUrl = config.Root.Element("AccessTokenUrl").Value;
        }

        public const string AccessTokenString = "AccessToken";
        public const string AccessTokenSecretString = "AccessTokenSecret";
        public const string UserIdString = "UserId";

        public static string AppKey
        {
            get;
            set;
        }

        public static string AppSecret
        {
            get;
            set;
        }

        public static string RequestTokenUrl
        {
            get;
            set;
        }

        public static string AuthorizeUrl
        {
            get;
            set;
        }

        public static string AccessTokenUrl
        {
            get;
            set;
        }

        public static string AccessToken
        {
            get;
            set;
        }

        public static string AccessTokenSecret
        {
            get;
            set;
        }

        public static string UserId
        {
            get;
            set;
        }
    }
}
